<template>

  <MrCustom bg-color="bg-gradual-blue ">
    <template #full>
      <SearchInput disable></SearchInput>
    </template>
  </MrCustom>
  <view class="bg-white margin radius-lg">
    <view class="cu-bar">
      <view class="action">
        <text class="cuIcon-titles text-blue"></text>
        <text class="text-xl text-bold">服务指南</text>
      </view>
    </view>
    <view class="nav-list">
      <navigator hover-class='none' :url="item.url"
                 class="nav-li" navigateTo :class="'bg-'+item.color"
                 v-for="(item,index) in menu" :key="index"
                 :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]">
        <view class="nav-title">{{ item.title }}</view>
        <view class="nav-name">{{ item.name }}</view>
        <text :class="'cuIcon-' + item.cuIcon"></text>
      </navigator>
    </view>
  </view>
  <view class="bg-white margin radius-lg">
    <view class="cu-bar">
      <view class="action">
        <text class="cuIcon-titles text-blue"></text>
        <text class="text-xl text-bold">问诊解答</text>
      </view>
      <view class="action">
        <navigator url="/pages/nurse/inquiry/list">
          <text class="text-lg text-gray">
            更多
            <text class="cuIcon-right"></text>
          </text>
        </navigator>
      </view>
    </view>
    <HomeInquiry></HomeInquiry>
  </view>
  <view class="bg-white margin radius-lg">
    <view class="cu-bar">
      <view class="action">
        <text class="cuIcon-titles text-blue"></text>
        <text class="text-xl text-bold">热点文章</text>
      </view>
      <view class="action">
        <navigator url="/pages/common/article/list">
          <text class="text-lg text-gray">
            更多
            <text class="cuIcon-right"></text>
          </text>
        </navigator>
      </view>
    </view>
    <HomeArticle></HomeArticle>
  </view>
</template>

<script setup lang="ts">
import {ref} from "vue";
import SearchInput from "@/pages/common/search/components/SearchInput.vue";
import HomeInquiry from "@/pages/user/home/components/HomeInquiry.vue";
import MrCustom from "@/components/common/MrCustom.vue";
import HomeArticle from "@/pages/user/home/components/HomeArticle.vue";

const menu = ref([
  {
    title: '预约受理',
    name: 'appointment',
    color: 'red',
    cuIcon: 'service',
    url: '/pages/nurse/appointment/handle/handle',
  },
  {
    title: '就诊回防',
    name: 'visit',
    color: 'orange',
    cuIcon: 'form',
    url: '/pages/nurse/appointment/list?e=3',
  },
  {
    title: '文章中心',
    name: 'article',
    color: 'green',
    cuIcon: 'creative',
    url: '/pages/nurse/article/index',
  },
  {
    title: '我的日程',
    name: 'schedule',
    color: 'olive',
    cuIcon: 'calendar',
    url: '/pages/nurse/schedule/list',
  },
])

</script>

<style scoped>

</style>
